﻿using System.Collections.Generic;
using System.Linq;
using DAL;

namespace Administratation.Classes
{
    public class DatabaseOffersBrowserPersister
    {
        public static IEnumerable<Offer> GetOffers()
        {
            WPF_ExamEntities context = new WPF_ExamEntities();
            return context.CompleteOffers();
        }
    }

    public static class Extensions
    {
        public static IQueryable<Offer> CompleteOffers(this WPF_ExamEntities context)
        {
            return context.Offers.Include("Status").Include("Country").Include("Town").Include("Company") ;
        }
    }
}
